If you want it, chances are likely you can get it in San Francisco. There are a wide range of small and locally owned businesses throughout the city's neighborhoods; in fact, San Francisco has for the most part repelled the development of large chain retailers and big box stores that are common across America.
If it's tourist trinkets you're looking for, Fisherman's Wharf has the typical souvenir, T-shirt, and camera shops, along with plenty of specialty stores. However, San Francisco's most popular shopping area is Union Square, which has all the big national department stores Macy's, Saks, Nordstrom, etc. and plenty of fancy boutique stores, as well as a few shopping centers thrown in.
For small, upscale boutiques, Union Street, Fillmore Street, and Chestnut Street in the Golden Gate area are lined with unique and trendy places, and all three streets are among the best spots in the city to window shop. Nob Hill is also full of specialty places.
But if you don't have a luxury dollar to spend and still want to walk away with something unique, there are plenty of shops in Chinatown for you, selling Oriental handicrafts of all descriptions, and no chain stores in sight. Japantown also offers plenty of great shops selling authentic souvenirs, including the excellent Kinokuniya Stationery/Bookstore. The Haight is full of excellent independent record and book stores, with Amoeba Music dominating the scene.